<?php
  /*
  * ProjectMember.php
  * Links an employee to a Group
  */
class ProjectMember extends AppModel
{
	var $name = 'ProjectMember';
    var $primaryKey = 'id';
    //validation rules
        var $validate = array(
	'project_id'=> array(
		'rule'=>'numeric',
		'required'=>true
	),
	'employee_id'=> array(
		'rule'=>'numeric',
		'required'=>true
	)
        );

    public $belongsTo = array(
        'Project' => array(
            'className'     => 'Project',
        ),
	'Employee' => array(
            'className'     => 'Employee',
            'conditions'    => array('Employee.employee_id' => '$this->employee_id')
        )
    );
}
?>
